<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
		<style type="text/css">
			#ouxigei{
				background: gold;
				border: 2px solid green;
				display: none;
				width: 20%;
				height: 300px;
			}
			#apdd{
				background: greenyellow;
				border: 2px solid green;
				display: none;
				width: 20%;
				height: 400px;
			}
		</style>
	</head>
	<body>
		<!-- <input type="button" name="" id="in1" value="input" />
		<input type="text" name="" id="in2" value="阉人" />

		<input type="password" name="" id="" value="" />
		<div id="div1"> -->
		
		<input type="number" name="" id="in3" value="" />
		<input type="number" name="" id="in4" value="" />
		<button type="button" onclick="p2()">sure</button>

		</div>
		
		<div id="">
			
		</div>
		
		<span id="here" onclick="p3(this)">
			opoppop
		</span>
		<div id="ouxigei">
			
		</div>
		<div id="apdd">
			
		</div>

	</body>

	<script type="text/javascript">
		$("#in1").click(function() {
			console.log($(":input"))
			$("input[type='text']").css("background", "pink")
		})
		// $("#in1").append("<p>wuhu</p>")
		// 芜参数获取所有内容，有参数加入内容
		$("#div1").html("<h1>lfdplfp</h1>")
		// 获取所有文本内容
		console.log($("#div1").text())
		console.log($("#in2").val())
		console.log($("#in1").prop("type"))
		$("#div1").toggle()

		function p1() {
			// 创建table元素
			var $table = $("<table></table>")
			for (let i = 0; i < 5; i++) {
				var $tr = $("<tr></tr>")
				for (let i = 0; i < 6; i++) {
					var $td = $("<td>hello</td>")
					$tr.append($td)
				}


				$table.append($tr)
			}

			$("body").append($table)
		}
		p1()
		
		function p2(){
			x=$("#in3").val()
			y=$("#in4").val()
			var $table = $("<table></table>")
			for (let i = 0; i < x; i++) {
				var $tr = $("<tr></tr>")
				for (let i = 0; i < y; i++) {
					var $td = $("<td>hello</td>")
					$tr.append($td)
				}
			
			
				$table.append($tr)
			}
			
			$("body").append($table)
		}
		var flag=true;
		function p3(thisObj){
			
			// console.log(thisObj)
			/* if(flag==true){$(thisObj).next("div").css("display","block");flag=false}
			else{$(thisObj).next("div").css("display","none");flag=true} */
			$(thisObj).nextAll().slideToggle(1000)
		}
	</script>
</html>
